package edu.ccut.saturn.component.impl;

import edu.ccut.saturn.component.IDictItemInfo;

public class SaturnDictItemInfo implements IDictItemInfo {

	private String value;

	private String code;

	private String pinyin;

	private String type;
	
	private String parentCode;

	public String getParentCode() {
		return parentCode;
	}

	public void setParentCode(String parentId) {
		this.parentCode = parentId;
	}

	public SaturnDictItemInfo() {

	}

	public SaturnDictItemInfo(IDictItemInfo dictItemInfo) {
		this.value = dictItemInfo.getValue();
		this.code = dictItemInfo.getCode();
		this.pinyin = dictItemInfo.getPinyin();
		this.type = dictItemInfo.getType();
		this.parentCode = dictItemInfo.getParentCode();
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String py) {
		this.pinyin = py;
	}

	public String getType() {
		return type;
	}

	public void setType(String id) {
		this.type = id;
	}

	public int compareTo(IDictItemInfo dictItemInfo) {
		if (dictItemInfo == null) {
			return 1;
		}

		return this.type.compareTo(dictItemInfo.getType());
	}

}
